package rgr;

import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.HeadlessException;
import java.awt.Insets;

import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;
import javax.swing.JTextPane;
import javax.swing.border.TitledBorder;

import process.Dispatcher;
import process.DispatcherFinishListener;
import rnd.Erlang;
import rnd.Negexp;
import rnd.Norm;
import widgets.ChooseData;
import widgets.ChooseRandom;
import widgets.Diagram;

public class GUI extends JFrame {

	private static final long serialVersionUID = 1L;

	private JPanel jContentPane = null;

	private Diagram diagramHeepSize = null;

	private Diagram diagramQueueToEcsc = null;

	private Diagram diagramLorryOnRoad = null;

	private JButton jButtonStart = null;

	private JTabbedPane jTabbedPane = null;

	private JPanel jPanelTest = null;

	private JPanel jPanelModelParameters = null;

	private JPanel jPanel = null;

	private ChooseRandom rndDrob = null;

	private JPanel jPanel1 = null;

	private ChooseRandom rndEcsc = null;

	private JPanel jPanel2 = null;

	private ChooseRandom rndLorry = null;

	private JPanel jPanelStat = null;

	private Diagram diagramHistoQueueToEcsc = null;

	private JScrollPane jScrollPaneAvto = null;

	private JTextPane jTextPaneAvto = null;

	private JButton jButtonStat = null;

	private JLabel jLabelStatTestTime = null;

	private JSplitPane jSplitPane = null;

	private ChooseData chooseDataNLorry = null;

	private ChooseData chooseDataBodySize = null;

	private ChooseData chooseDataHeepMaxSize = null;

	private ChooseData chooseDataFinishTime = null;

	public GUI() throws HeadlessException {
		super();
		initialize();
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		GUI application = new GUI();
		application.setVisible(true);
	}

	/**
	 * This method initializes this
	 * 
	 * @return void
	 */
	private void initialize() {
		// this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setSize(525, 433);
		this.setContentPane(getJContentPane());
		this
				.setTitle("Дослідження каменевидобувних робіт шляхом імітаційного моделювання");
	}

	/**
	 * This method initializes jButtonStart
	 * 
	 * @return javax.swing.JButton
	 */
	private JButton getJButtonStart() {
		if (jButtonStart == null) {
			jButtonStart = new JButton();
			jButtonStart.setText("Старт");
			jButtonStart.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					startTest();
				}
			});
		}
		return jButtonStart;
	}

	private void startTest() {
		Dispatcher dispatcher = new Dispatcher();
		Factory factory = new Factory(GUI.this);
		Model model = factory.createModel(dispatcher);
		model.initForTest();
		getJButtonStart().setEnabled(false);
		getDiagramHeepSize().clear();
		getDiagramQueueToEcsc().clear();
		getDiagramLorryOnRoad().clear();
		dispatcher.addDispatcherFinishListener(
				new DispatcherFinishListener() {				
					public void onDispatcherFinish() {
						getJButtonStart().setEnabled(true);				
					}
				});
		dispatcher.start();
	}

	private void startStat() {
		Dispatcher dispatcher = new Dispatcher();
		Factory factory = new Factory(GUI.this);
		final Model model = factory.createModel(dispatcher);
		model.initForStat();
		getDiagramHistoQueueToLoader().clear();
		getJTextPaneAvto().setText("");
		getJButtonStat().setEnabled(false);		
		dispatcher.addDispatcherFinishListener(
				new DispatcherFinishListener() {				
					public void onDispatcherFinish() {
						getJButtonStat().setEnabled(true);
						model.getHistoForQueueToEcsc().showRelFrec(
								getDiagramHistoQueueToLoader());
						getJTextPaneAvto().setText(
								model.getHistoForQueueToEcsc().toString());
						getJTextPaneAvto().select(0, 0);
					}
				});
		dispatcher.start();
	}

	/**
	 * This method initializes jTabbedPane
	 * 
	 * @return javax.swing.JTabbedPane
	 */
	private JTabbedPane getJTabbedPane() {
		if (jTabbedPane == null) {
			jTabbedPane = new JTabbedPane();
			jTabbedPane.setName("");
			jTabbedPane.setVisible(true);
			jTabbedPane.setFont(new java.awt.Font("Courier New",
					java.awt.Font.PLAIN, 14));
			jTabbedPane.addTab("Тест моделі", null, getJPanelTest(), null);
			jTabbedPane.addTab("Статистика", null, getJPanelStat(),
					"Статистичні характеристики");
		}
		return jTabbedPane;
	}

	/**
	 * This method initializes jPanelTest
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJPanelTest() {
		if (jPanelTest == null) {
			GridBagConstraints gridBagConstraints12 = new GridBagConstraints();
			gridBagConstraints12.insets = new Insets(4, 4, 4, 4);
			gridBagConstraints12.gridy = 4;
			gridBagConstraints12.ipadx = 10;
			gridBagConstraints12.ipady = -1;
			gridBagConstraints12.fill = GridBagConstraints.HORIZONTAL;
			gridBagConstraints12.gridwidth = 3;
			gridBagConstraints12.gridx = 1;
			GridBagConstraints gridBagConstraints11 = new GridBagConstraints();
			gridBagConstraints11.insets = new Insets(4, 4, 4, 4);
			gridBagConstraints11.gridx = 0;
			gridBagConstraints11.gridy = 2;
			gridBagConstraints11.ipadx = 183;
			gridBagConstraints11.ipady = -86;
			gridBagConstraints11.fill = java.awt.GridBagConstraints.BOTH;
			gridBagConstraints11.weightx = 1.0D;
			gridBagConstraints11.weighty = 1.0D;
			gridBagConstraints11.gridwidth = 4;
			GridBagConstraints gridBagConstraints10 = new GridBagConstraints();
			gridBagConstraints10.insets = new Insets(4, 4, 4, 4);
			gridBagConstraints10.gridx = 0;
			gridBagConstraints10.gridy = 1;
			gridBagConstraints10.ipadx = 183;
			gridBagConstraints10.ipady = -86;
			gridBagConstraints10.weightx = 1.0D;
			gridBagConstraints10.weighty = 1.0D;
			gridBagConstraints10.fill = java.awt.GridBagConstraints.BOTH;
			gridBagConstraints10.gridwidth = 4;
			GridBagConstraints gridBagConstraints8 = new GridBagConstraints();
			gridBagConstraints8.insets = new Insets(4, 4, 4, 4);
			gridBagConstraints8.gridx = 0;
			gridBagConstraints8.gridy = 0;
			gridBagConstraints8.ipadx = 183;
			gridBagConstraints8.ipady = -86;
			gridBagConstraints8.fill = java.awt.GridBagConstraints.BOTH;
			gridBagConstraints8.weightx = 1.0D;
			gridBagConstraints8.weighty = 1.0D;
			gridBagConstraints8.gridheight = 1;
			gridBagConstraints8.gridwidth = 4;
			jPanelTest = new JPanel();
			jPanelTest.setLayout(new GridBagLayout());
			jPanelTest.add(getDiagramHeepSize(), gridBagConstraints8);
			jPanelTest.add(getDiagramQueueToEcsc(), gridBagConstraints10);
			jPanelTest.add(getDiagramLorryOnRoad(), gridBagConstraints11);
			jPanelTest.add(getJButtonStart(), gridBagConstraints12);
			jPanelTest
					.addComponentListener(new java.awt.event.ComponentAdapter() {
						public void componentShown(
								java.awt.event.ComponentEvent e) {
							// Искуственно формируем событие CaretUpdate,
							// чтобы обновить настройку диаграмм
							getChooseDataNLorry().select(0,0);
							getChooseDataFinishTime().select(0,0);
							getChooseDataHeepMaxSize().select(0,0);
						}
					});
		}
		return jPanelTest;
	}

	/**
	 * This method initializes jPanelModelParameters
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJPanelModelParameters() {
		if (jPanelModelParameters == null) {
			GridLayout gridLayout = new GridLayout();
			gridLayout.setRows(7);
			gridLayout.setVgap(5);
			gridLayout.setHgap(1);
			jPanelModelParameters = new JPanel();
			jPanelModelParameters.setLayout(gridLayout);
			jPanelModelParameters
					.setBorder(javax.swing.BorderFactory
							.createTitledBorder(
									javax.swing.BorderFactory
											.createBevelBorder(javax.swing.border.BevelBorder.RAISED),
									"Параметри системи",
									javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
									javax.swing.border.TitledBorder.DEFAULT_POSITION,
									new java.awt.Font("Dialog",
											java.awt.Font.BOLD, 12),
									new java.awt.Color(51, 51, 51)));
			jPanelModelParameters.add(getJPanel(), null);
			jPanelModelParameters.add(getJPanel1(), null);
			jPanelModelParameters.add(getJPanel2(), null);
			jPanelModelParameters.add(getChooseDataNLorry(), null);
			jPanelModelParameters.add(getChooseDataBodySize(), null);
			jPanelModelParameters.add(getChooseDataHeepMaxSize(), null);
			jPanelModelParameters.add(getChooseDataFinishTime(), null);
		}
		return jPanelModelParameters;
	}

	/**
	 * This method initializes jPanel
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJPanel() {
		if (jPanel == null) {
			jPanel = new JPanel();
			jPanel.setLayout(new CardLayout());
			jPanel.setPreferredSize(new Dimension(220, 61));
			jPanel.setBorder(BorderFactory.createTitledBorder(null,
					"Продуктивність дробарки",
					TitledBorder.DEFAULT_JUSTIFICATION,
					TitledBorder.DEFAULT_POSITION, new Font("Dialog",
							Font.PLAIN, 12), new Color(51, 51, 51)));
			jPanel.add(getRndBuldo(), getRndBuldo().getName());
		}
		return jPanel;
	}

	/**
	 * This method initializes chooseRandom
	 * 
	 * @return rnd.ChooseRandom
	 */
	public ChooseRandom getRndBuldo() {
		if (rndDrob == null) {
			Negexp negexp = new Negexp();
			negexp.setM(3.0D);
			rndDrob = new ChooseRandom();
			rndDrob.setName("chooseRandomDrob");
			rndDrob.setRandom(negexp);
		}
		return rndDrob;
	}

	/**
	 * This method initializes jPanel1
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJPanel1() {
		if (jPanel1 == null) {
			jPanel1 = new JPanel();
			jPanel1.setLayout(new CardLayout());
			jPanel1.setPreferredSize(new Dimension(220, 61));
			jPanel1.setBorder(BorderFactory.createTitledBorder(null,
					"Продуктивність екскалатора",
					TitledBorder.DEFAULT_JUSTIFICATION,
					TitledBorder.DEFAULT_POSITION, new Font("Dialog",
							Font.PLAIN, 12), new Color(51, 51, 51)));
			jPanel1.add(getRndEcsc(), getRndEcsc().getName());
		}
		return jPanel1;
	}

	/**
	 * This method initializes chooseRandom1
	 * 
	 * @return rnd.ChooseRandom
	 */
	public ChooseRandom getRndEcsc() {
		if (rndEcsc == null) {
			rndEcsc = new ChooseRandom();
			rndEcsc.setName("chooseRandomEcsc");
			rndEcsc.setRandom(new Norm());
		}
		return rndEcsc;
	}

	/**
	 * This method initializes jPanel2
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJPanel2() {
		if (jPanel2 == null) {
			jPanel2 = new JPanel();
			jPanel2.setLayout(new CardLayout());
			jPanel2.setMinimumSize(new Dimension(190, 61));
			jPanel2.setPreferredSize(new Dimension(220, 61));
			jPanel2.setBorder(BorderFactory.createTitledBorder(null,
					"Перебування самоскиду у дорозі", TitledBorder.CENTER,
					TitledBorder.DEFAULT_POSITION, new Font("Dialog",
							Font.PLAIN, 12), new Color(51, 51, 51)));
			jPanel2.add(getRndLorry(), getRndLorry().getName());
		}
		return jPanel2;
	}

	/**
	 * This method initializes chooseRandom2
	 * 
	 * @return rnd.ChooseRandom
	 */
	public ChooseRandom getRndLorry() {
		if (rndLorry == null) {
			Erlang erlang = new Erlang();
			erlang.setK(3);
			erlang.setM(20.0D);
			rndLorry = new ChooseRandom();
			rndLorry.setName("chooseRandomLorry");
			rndLorry.setRandom(erlang);
		}
		return rndLorry;
	}

	/**
	 * This method initializes jPanel3
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJPanelStat() {
		if (jPanelStat == null) {
			GridBagConstraints gridBagConstraints28 = new GridBagConstraints();
			gridBagConstraints28.insets = new Insets(4, 4, 4, 4);
			gridBagConstraints28.gridy = 2;
			gridBagConstraints28.ipadx = 11;
			gridBagConstraints28.gridx = 1;

			GridBagConstraints gridBagConstraints27 = new GridBagConstraints();
			gridBagConstraints27.insets = new Insets(4, 4, 4, 4);
			gridBagConstraints27.gridy = 2;
			gridBagConstraints27.ipadx = 0;
			gridBagConstraints27.anchor = GridBagConstraints.WEST;
			gridBagConstraints27.fill = GridBagConstraints.HORIZONTAL;
			gridBagConstraints27.gridwidth = 3;
			gridBagConstraints27.gridx = 0;

			GridBagConstraints gridBagConstraints18 = new GridBagConstraints();
			gridBagConstraints18.fill = java.awt.GridBagConstraints.BOTH;
			gridBagConstraints18.gridx = 0;
			gridBagConstraints18.gridy = 1;
			gridBagConstraints18.ipadx = 207;
			gridBagConstraints18.ipady = 164;
			gridBagConstraints18.weightx = 1.0;
			gridBagConstraints18.weighty = 1.0;
			gridBagConstraints18.gridwidth = 3;
			gridBagConstraints18.insets = new Insets(4, 4, 4, 4);

			GridBagConstraints gridBagConstraints16 = new GridBagConstraints();
			gridBagConstraints16.insets = new Insets(4, 4, 4, 4);
			gridBagConstraints16.gridy = 0;
			gridBagConstraints16.ipadx = -32;
			gridBagConstraints16.ipady = -13;
			gridBagConstraints16.fill = GridBagConstraints.BOTH;
			gridBagConstraints16.weightx = 1.0D;
			gridBagConstraints16.weighty = 1.0D;
			gridBagConstraints16.gridwidth = 3;
			gridBagConstraints16.gridx = 0;

			jLabelStatTestTime = new JLabel();
			jLabelStatTestTime.setIconTextGap(1);
			jLabelStatTestTime
					.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
			jLabelStatTestTime.setPreferredSize(new Dimension(100, 16));
			jLabelStatTestTime.setText("");
			jPanelStat = new JPanel();
			jPanelStat.setLayout(new GridBagLayout());
			jPanelStat
					.add(getDiagramHistoQueueToLoader(), gridBagConstraints16);
			jPanelStat.add(getJScrollPaneAvto(), gridBagConstraints18);
			jPanelStat.add(getJButtonStat(), gridBagConstraints27);
			jPanelStat.add(jLabelStatTestTime, gridBagConstraints28);
		}
		return jPanelStat;
	}

	/**
	 * This method initializes diagram1
	 * 
	 * @return paint.Diagram
	 */
	private Diagram getDiagramHistoQueueToLoader() {
		if (diagramHistoQueueToEcsc == null) {
			diagramHistoQueueToEcsc = new Diagram();
			diagramHistoQueueToEcsc
					.setTitleText("Гістограма для черги до екскалатора");
		}
		return diagramHistoQueueToEcsc;
	}

	/**
	 * This method initializes jScrollPane
	 * 
	 * @return javax.swing.JScrollPane
	 */
	private JScrollPane getJScrollPaneAvto() {
		if (jScrollPaneAvto == null) {
			jScrollPaneAvto = new JScrollPane();
			jScrollPaneAvto.setViewportView(getJTextPaneAvto());
		}
		return jScrollPaneAvto;
	}

	/**
	 * This method initializes jTextPane
	 * 
	 * @return javax.swing.JTextPane
	 */
	private JTextPane getJTextPaneAvto() {
		if (jTextPaneAvto == null) {
			jTextPaneAvto = new JTextPane();
			jTextPaneAvto.setFont(new java.awt.Font("Courier New",
					java.awt.Font.PLAIN, 14));
		}
		return jTextPaneAvto;
	}

	/**
	 * This method initializes jButtonStat
	 * 
	 * @return javax.swing.JButton
	 */
	private JButton getJButtonStat() {
		if (jButtonStat == null) {
			jButtonStat = new JButton();
			jButtonStat.setMargin(new java.awt.Insets(2, 4, 2, 4));
			jButtonStat.setText("Почати експеримент");
			jButtonStat.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					startStat();
				}
			});

		}
		return jButtonStat;
	}

	/**
	 * This method initializes jSplitPane
	 * 
	 * @return javax.swing.JSplitPane
	 */
	private JSplitPane getJSplitPane() {
		if (jSplitPane == null) {
			jSplitPane = new JSplitPane();
			jSplitPane.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
			jSplitPane.setDividerSize(5);
			jSplitPane.setLeftComponent(getJPanelModelParameters());
			jSplitPane.setRightComponent(getJTabbedPane());
			jSplitPane.setDividerLocation(230);
		}
		return jSplitPane;
	}

	/**
	 * This method initializes chooseDataNLorry
	 * 
	 * @return widgets.ChooseData
	 */
	public ChooseData getChooseDataNLorry() {
		if (chooseDataNLorry == null) {
			chooseDataNLorry = new ChooseData();
			chooseDataNLorry.setText("7");
			chooseDataNLorry.setTitle("Кількість самоскидів");
			chooseDataNLorry.setPreferredSize(new Dimension(15, 48));
			chooseDataNLorry.setMaximumSize(new Dimension(21, 2147483647));
			chooseDataNLorry.setBackground(new Color(238, 238, 238));
			chooseDataNLorry.setHorizontalAlignment(JTextField.CENTER);
			chooseDataNLorry
					.addCaretListener(new javax.swing.event.CaretListener() {
						public void caretUpdate(javax.swing.event.CaretEvent e) {
							if (getJPanelTest().isShowing()){
								getDiagramLorryOnRoad().setVerticalMaxText(
										chooseDataNLorry.getText());
								getDiagramQueueToEcsc().setVerticalMaxText(
										chooseDataNLorry.getText());
							}
						}
					});
		}
		return chooseDataNLorry;
	}

	/**
	 * This method initializes chooseDataSize
	 * 
	 * @return widgets.ChooseData
	 */
	public ChooseData getChooseDataBodySize() {
		if (chooseDataBodySize == null) {
			chooseDataBodySize = new ChooseData();
			chooseDataBodySize.setText("2");
			chooseDataBodySize.setTitle("Місткість кузову");
			chooseDataBodySize.setBackground(new Color(238, 238, 238));
			chooseDataBodySize.setHorizontalAlignment(JTextField.CENTER);
		}
		return chooseDataBodySize;
	}

	/**
	 * This method initializes chooseDataMaxHeepSize
	 * 
	 * @return widgets.ChooseData
	 */
	public ChooseData getChooseDataHeepMaxSize() {
		if (chooseDataHeepMaxSize == null) {
			chooseDataHeepMaxSize = new ChooseData();
			chooseDataHeepMaxSize.setTitle("Найбільший розмір купи");
			chooseDataHeepMaxSize.setHorizontalAlignment(JTextField.CENTER);
			chooseDataHeepMaxSize.setBackground(new Color(238, 238, 238));
			chooseDataHeepMaxSize.setText("50");
			chooseDataHeepMaxSize
					.addCaretListener(new javax.swing.event.CaretListener() {
						public void caretUpdate(javax.swing.event.CaretEvent e) {
							if (getJPanelTest().isShowing())
								getDiagramHeepSize().setVerticalMaxText(
										chooseDataHeepMaxSize.getText());
						}
					});
		}
		return chooseDataHeepMaxSize;
	}

	/**
	 * This method initializes chooseDataFinTime
	 * 
	 * @return widgets.ChooseData
	 */
	public ChooseData getChooseDataFinishTime() {
		if (chooseDataFinishTime == null) {
			chooseDataFinishTime = new ChooseData();
			chooseDataFinishTime.setBackground(new Color(238, 238, 238));
			chooseDataFinishTime.setHorizontalAlignment(JTextField.CENTER);
			chooseDataFinishTime.setTitle("Час моделювання");
			chooseDataFinishTime.setText("100");
			chooseDataFinishTime
					.addCaretListener(new javax.swing.event.CaretListener() {
						public void caretUpdate(javax.swing.event.CaretEvent e) {
							if (getJPanelTest().isShowing()) {
								getDiagramHeepSize().setHorizontalMaxText(
										chooseDataFinishTime.getText());
								getDiagramQueueToEcsc().setHorizontalMaxText(
										chooseDataFinishTime.getText());
								getDiagramLorryOnRoad().setHorizontalMaxText(
										chooseDataFinishTime.getText());
							}
						}
					});

		}
		return chooseDataFinishTime;
	}


	/**
	 * This method initializes jContentPane
	 * 
	 * @return javax.swing.JPanel
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			GridBagConstraints gridBagConstraints1 = new GridBagConstraints();
			gridBagConstraints1.fill = GridBagConstraints.BOTH;
			gridBagConstraints1.weighty = 1.0;
			gridBagConstraints1.weightx = 1.0;
			jContentPane = new JPanel();
			jContentPane.setLayout(new GridBagLayout());
			jContentPane.add(getJSplitPane(), gridBagConstraints1);
		}
		return jContentPane;
	}


	/**
	 * This method initializes diagramHeep
	 * 
	 * @see IRgrGUI.IBuldoGUI
	 * @return paint.Diagram
	 */
	public Diagram getDiagramHeepSize() {
		if (diagramHeepSize == null) {
			diagramHeepSize = new Diagram();
			diagramHeepSize.setHorizontalMaxText("100");
			diagramHeepSize.setTitleText("Розмір купи каміння");
			diagramHeepSize.setVerticalMaxText("50");
			diagramHeepSize.setPainterColor(new java.awt.Color(204, 102, 0));
		}
		return diagramHeepSize;
	}

	/**
	 * This method initializes diagramToLoader
	 * 
	 * @see toLab4_2012.IRgrGUI
	 * @return paint.Diagram
	 */
	public Diagram getDiagramQueueToEcsc() {
		if (diagramQueueToEcsc == null) {
			diagramQueueToEcsc = new Diagram();
			diagramQueueToEcsc.setHorizontalMaxText("100");
			diagramQueueToEcsc
					.setTitleText("Черга самоскидів до екскалатора");
			diagramQueueToEcsc.setVerticalMaxText("8");
			diagramQueueToEcsc.setPainterColor(java.awt.Color.magenta);
		}
		return diagramQueueToEcsc;
	}

	/**
	 * This method initializes diagram
	 * 
	 * @see IRgrGUI.IBuldoGUI
	 * @return paint.Diagram
	 */
	public Diagram getDiagramLorryOnRoad() {
		if (diagramLorryOnRoad == null) {
			diagramLorryOnRoad = new Diagram();
			diagramLorryOnRoad.setHorizontalMaxText("100");
			diagramLorryOnRoad.setTitleText("Самоскиди у дорозі");
			diagramLorryOnRoad.setVerticalMaxText("8");
			diagramLorryOnRoad
					.setPainterColor(java.awt.SystemColor.activeCaption);
		}
		return diagramLorryOnRoad;
	}

}
// @jve:decl-index=0:visual-constraint="10,8"
